/**
 * @author tongchen
 * @create 2023-01-08 21:42
 */
public class findOne {
    public static void main(String[] args) {
        int num=2580;
        int count=0;
        for (int i=0;i<32;++i){
          if(((num>>i)&1)==1){
              count++;
          }

        }
        System.out.println(count);
        System.out.println("-----------------------------------------");
        count=0;
        while(num!=0){
            count++;
            num=num&(num-1);
        }
        System.out.println(count);
    }

}
